package com.hjl;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test{

    @Test
    public void test(){
        ApplicationContext applicationContext=
new ClassPathXmlApplicationContext("beans.xml");
        Demo demo=(Demo)ac.getBean("demo");
        System.out.println(demo);
        ((ClassPathXmlApplicationContext)ac).close();
    }
}
